<?php
namespace Application\Form;

use Zend\Form\Form;

class ProduitForm extends Form
{
    public function __construct($name = null)
    {
        // we want to ignore the name passed
        parent::__construct('produit');
        $this->setAttribute('method', 'post');
        $this->add(array(
            'name' => 'id',
            'attributes' => array(
                'type'  => 'hidden',
            ),
        ));
        $this->add(array(
            'name' => 'libelle',
            'attributes' => array(
                'type'  => 'text',
            ),
            'options' => array(
                'label' => 'Libelle',
            ),
        ));
        $this->add(array(
            'name' => 'description',
            'attributes' => array(
                'type'  => 'textarea',
            ),
            'options' => array(
                'label' => 'Description',
                'id'    => 'editor1',
                'name'  => 'editor1',
            ),
        ));
        $this->add(array(
            'name' => 'taille',
            'attributes' => array(
                'type'  => 'text',
            ),
            'options' => array(
                'label' => 'Taille',
            ),
        ));
        $this->add(array(
            'name' => 'prix',
            'attributes' => array(
                'type'  => 'text',
            ),
            'options' => array(
                'label' => 'Prix',
            ),
        ));
        $this->add(array(
            'name' => 'categorie',
            'attributes' => array(
                'type'  => 'text',
            ),
            'options' => array(
                'label' => 'Categorie',
            ),
        ));
        $this->add(array(
            'name' => 'boutique',
            'attributes' => array(
                'type'  => 'hidden',
            ),
        ));
        $this->add(array(
            'name' => 'etat',
            'attributes' => array(
                'type'  => 'text',
            ),
            'options' => array(
                'label' => 'Etat',
            ),
        ));
       
        $this->add(array(
            'name' => 'submit',
            'attributes' => array(
                'type'  => 'submit',
                'value' => 'Go',
                'id' => 'submitbutton',
            ),
        ));
    }
}